<tagLib name="html" /> 
<include file="Public:top" />
<style>
input{margin-bottom:10p;}
tr{ height:34px;}
</style>
<script>
/*jQuery(function(){
	$('#cc').combobox({
		url:'__URL__/showSchoolList',width:150,
		valueField:'id',
		textField:'sName',
		onSelect:function(record){  
            $('#dwid').val(record.id);   
			$('#dwmc').val(record.sName);         
        }  
	});
})*/
function save(){
	if(editor)$('#remarks').val(editor.html());
	$.post("__URL__/insert/",$('#form1').serialize(),function(data){
		$.messager.show({title:'提示信息',msg:data.info,timeout:2000,showType:'slide'});
	}//function
	,"json");//post	
}
</script>
<div id="main" class="" >
<div class="content">
<div class="title">新增校舍安全信息 [ <a href="__URL__">返回列表</a> ]</div>
<form method='post' id="form1" action="__URL__/insert/" >
  <table width="95%" cellpadding="3" cellspacing="3" id="tb1">
    <tr>
      <td class="tRight" >楼宇名称：</td>
      <td class="tLeft" ><input type="text" class="large bLeft" name="lymc" value="{$vo.lymc}" title="楼宇名称"/></td>
      <td width="4%" class="tRight" >&nbsp;</td>
      <td class="tRight">整改设计单位：</td>
      <td class="tLeft"><input name="zgsjdw" type="text" class="large bLeft" id="zgsjdw" value="{$vo.zgsjdw}" title="整改设计单位" /></td>
      <td class="tLeft">&nbsp;</td>
    </tr>
    <tr>
      <td class="tRight" >单位名称：</td>
      <td class="tLeft" ><!--<select id="cc" class="easyui-combobox" name="dwmc1"></select>-->
        <input type="text" class="large bLeft" id="ccc" name="ccc" value="{$vo.dwmc}" title="选择单位" />
        <input name="dwmc" id="dwmc" type="hidden" value="{$vo.dwmc}" />
        <input name="dwid" id="dwid" type="hidden" value="{$vo.dwid}" /></td>
      <td class="tRight" >&nbsp;</td>
      <td class="tRight">整改设计费用：</td>
      <td class="tLeft"><input name="zgsjfy" type="text" class="large bLeft" id="zgsjfy" value="{$vo.zgsjfy}" title="整改设计费用" />
        元</td>
      <td class="tLeft">&nbsp;</td>
    </tr>
    <tr>
      <td class="tRight">占地面积：</td>
      <td class="tLeft"><input type="text" class="large bLeft" id="zdmj" name="zdmj" value="{$vo.zdmj}" title="占地面积" />
        平米</td>
      <td class="tRight">&nbsp;</td>
      <td class="tRight">整改施工单位：</td>
      <td class="tLeft"><input name="zgsgdw" type="text" class="large bLeft" id="zgsgdw" value="{$vo.zgsgdw}" title="整改施工单位" /></td>
      <td class="tLeft">&nbsp;</td>
    </tr>
    <tr>
      <td class="tRight">建筑面积：</td>
      <td class="tLeft"><input type="text" class="large bLeft" id="jzmj" name="jzmj" value="{$vo.jzmj}" title="建筑面积" /></td>
      <td class="tRight">&nbsp;</td>
      <td class="tRight">整改工程中标价：</td>
      <td class="tLeft"><input name="zggczbj" type="text" class="large bLeft" id="zggczbj" value="{$vo.zggczbj}" title="整改工程中标价" />
        万元</td>
      <td class="tLeft">&nbsp;</td>
    </tr>
    <tr>
      <td class="tRight">设计单位：</td>
      <td class="tLeft"><input type="text" class="large bLeft" id="sjdw" name="sjdw" value="{$vo.sjdw}" title="设计单位" /></td>
      <td class="tRight">&nbsp;</td>
      <td class="tRight">整改监理单位：</td>
      <td class="tLeft"><input name="zgjldw" type="text" class="large bLeft" id="zgjldw" value="{$vo.zgjldw}" title="整改监理单位" /></td>
      <td class="tLeft">&nbsp;</td>
    </tr>
    <tr>
      <td class="tRight">施工单位：</td>
      <td class="tLeft"><input type="text" class="large bLeft" id="sgdw" name="sgdw" value="{$vo.sgdw}" title="施工单位" /></td>
      <td class="tRight">&nbsp;</td>
      <td class="tRight" >整改监理费：</td>
      <td class="tLeft" ><input name="zgjlf" type="text" class="large bLeft" id="zgjlf" value="{$vo.zgjlf}" title="整改监理费" /></td>
      <td class="tLeft" >&nbsp;</td>
    </tr>
    <tr>
      <td class="tRight">竣工时间：</td>
      <td class="tLeft"><input type="text"  class="easyui-datebox large bLeft" id="jgsj" name="jgsj" value="" title="竣工时间" /></td>
      <td class="tRight">&nbsp;</td>
      <td class="tRight" >整改代建单位：</td>
      <td class="tLeft" ><input name="zgdjdw" type="text" class="large bLeft" id="zgdjdw" value="{$vo.zgdjdw}" title="整改代建单位(没有代建的填‘无’)" /></td>
      <td class="tLeft" >&nbsp;</td>
    </tr>
    <tr>
      <td class="tRight" >整改方式：</td>
      <td class="tLeft" ><select class="large bLeft"  name="zgfs" title="选择整改方式，加固、拆除重建或异地新建">
        <option 
        <eq name="vo.zgfs" value="加固" >selected</eq>
         value="加固">加固
        </option>
        <option 
        <eq name="vo.zgfs" value="拆除重建" >selected</eq>
         value="拆除重建">拆除重建
        </option>
        <option 
        <eq name="vo.zgfs" value="异地新建" >selected</eq>
         value="异地新建">异地新建
        </option>
      </select></td>
      <td class="tRight">&nbsp;</td>
      <td class="tRight" >整改竣工时间：</td>
      <td class="tLeft" ><input  name="zgjgsj" type="text" class="easyui-datebox large bLeft" id="zgjgsj" title="整改竣工时间" /></td>
      <td class="tLeft" >&nbsp;</td>
    </tr>
    <tr>
      <td class="tRight" >拟整改年度：</td>
      <td class="tLeft" ><!--<select id="cc" class="easyui-combobox" name="dwmc1"></select>-->
        <select class="large bLeft"  name="nzgnd" title="拟整改年度" id="nzgnd">
          <option <eq name="vo.nzgnd" value="2007" >selected</eq> value="2007">2007</option>
          <option <eq name="vo.nzgnd" value="2008" >selected</eq> value="2008">2008</option>
          <option <eq name="vo.nzgnd" value="2009" >selected</eq> value="2009">2009</option>
          <option <eq name="vo.nzgnd" value="2010" >selected</eq> value="2010">2010</option>
          <option <eq name="vo.nzgnd" value="2011" >selected</eq> value="2011">2011</option>
          <option <eq name="vo.nzgnd" value="2012" >selected</eq> value="2012">2012</option>
          <option <eq name="vo.nzgnd" value="2013" >selected</eq> value="2013">2013</option>
          <option <eq name="vo.nzgnd" value="2014" >selected</eq> value="2014">2014</option>
          <option <eq name="vo.nzgnd" value="2015" >selected</eq> value="2015">2015</option>
          <option <eq name="vo.nzgnd" value="2016" >selected</eq> value="2016">2016</option>
          <option <eq name="vo.nzgnd" value="2017" >selected</eq> value="2017">2017</option>
          <option <eq name="vo.nzgnd" value="2018" >selected</eq> value="2018">2018</option>
        </select></td>
      <td class="tRight">&nbsp;</td>
      <td class="tRight" >责任人：</td>
      <td class="tLeft" ><input  name="zrr" type="text" class="large bLeft" id="zrr" value="{$vo.zrr}" title="责任人" /></td>
      <td class="tLeft" >&nbsp;</td>
    </tr>
    <tr>
      <td class="tRight">预算资金：</td>
      <td class="tLeft"><input type="text" class="large bLeft" id="yszj" name="yszj" value="{$vo.yszj}" title="预算资金" />
        万元</td>
      <td class="tRight">&nbsp;</td>
      <td class="tRight">备注信息：</td>
      <td class="tLeft"><a href="#" id="a_remarks" f="remarks" s="备注信息">点击添加备注信息</a><input name="remarks" id="remarks" type="hidden" value="" /></td>
      <td class="tLeft">&nbsp;</td>
    </tr>
    <tr>
      <td class="tRight">实施时间：</td>
      <td class="tLeft"><input type="text" class="easyui-datebox large bLeft" id="sssj" name="sssj" value="" /></td>
      <td class="tRight" >&nbsp;</td>
      <td class="tRight" >&nbsp;</td>
      <td rowspan="3" align="left" valign="top" class="tLeft huge" >记录立项时间及其他资料、各类批文、各种相关手续及费用、各类合同、设计平面图、效果图、整改跟踪图片等。</td>
      <td class="tLeft" >&nbsp;</td>
    </tr>
    <tr>
      <td class="tRight">改建后面积：</td>
      <td class="tLeft"><input type="text" class="large bLeft" id="gjhmj" name="gjhmj" value="{$vo.gjhmj}" title="改建后面积" />
        平米</td>
      <td class="tRight" >&nbsp;</td>
      <td class="tRight" >&nbsp;</td>
      <td class="tLeft" >&nbsp;</td>
    </tr>
    <!--    <tr>
      <td class="tRight">状态：</td>
      <td class="tLeft"><select class="small bLeft"  name="status">
        <option value="1">启用</option>
        <option value="0">禁用</option>
      </select></td>
      <td class="tLeft">&nbsp;</td>
    </tr>-->
    <tr>
      <td></td>
      <td class="center"><input type="hidden" name="id" value="{$vo.id}" />
        <input type="button" value="保 存" onclick="save()" class="small submit" />
        <!--<input type="reset" class="submit  small" value="清 空" />--></td>
      <td></td>
      <td></td>
      <td class="center"></td>
    </tr>
  </table>
</form>
</div>
</div>
<include file="Public:footer" />
<div class="hide" style="height:100%" id="hideDiv">
	<div id="dlg_remarks" class="dlg"><div id="div_remarks" class="dlg1">{$vo.remarks}</div></div>
  	<div id="tempDiv"></div>   
</div>
<div id="popSchool" class="hide">
<ul id="tList"><li>公办中学</li><li>公办小学</li><li>公办幼儿园</li><li>局直属单位</li></ul>
<ul id="sList"></ul>
</div>
<script>
jQuery(function(){
	var myDate  = new Date();
	var yy		= myDate.getFullYear(); 
	$('#nzgnd').val(yy+'');
	$.post("__URL__/showSchoolList/",0,function(data){
			for(i=0;i<data.length;i++){
				$('#sList').append("<li sID="+ data[i]['id'] +" sType="+ data[i]['sType'] +">"+data[i]['sName'].substring()+"</li>")
			}//for	
			$('#sList li').addClass("hand").hover(function(){
			  $(this).addClass("bg_green");
			},function () {
			  $(this).removeClass("bg_green");
			})//hover
			$('#sList li').click(function(){
				sType 	= $(this).attr("sType");
				sID		= $(this).attr("sID");
				sName	= $(this).text();
				$('#dwid').val(sID);   
				$('#dwmc').val(sName); 
				$('#ccc').val(sName); 
			}).hide()//click
		}//function
	,"json");//post	
		
	$('#ccc').popDiv({"targetDiv" : "popSchool"});
	$('#popSchool li').addClass("hand").hover(function(){
			$(this).addClass("bg_green");
		  },function () {
			$(this).removeClass("bg_green");
	}).click(function(){
		$('#sList li').hide();
		$("#sList li[sType='"+$(this).html()+"']").show();
	})//click
	
	$("#a_remarks").click(function(){
		$('#div_'+ff).html($('#remarks').val());
		var ff = $(this).attr("f");//f用于表示操作的字段，
		var sf = $(this).attr("s");//s用于显示的标题
		$('#dlg_'+ff).unbind().dialog({
			onOpen:function(){
				$('html').addClass('hidescroll');},
			onClose:function(){
				$('html').removeClass('hidescroll');
			},
			modal:true,title:sf+"查看修改对话框(双击进入编辑状态)",width:windowW,height:windowH,maximizable:true,resizable:true,
			buttons:[{
				text:'保存',iconCls:'icon-ok',
				handler:function(){
					if(editor)$('#remarks').val(editor.html());
					$('#dlg_'+ff).dialog('close');
				}
			},{
				text:'关闭',handler:function(){
					$('#dlg_'+ff).dialog('close');
				}
			}]
		});	
		//不足5个字符时直接显示编辑器
		if($('#div_'+ff).html().length<5){
			editor = showEditor(ff,0,495);
		}else{
			jQuery('#dlg_'+ff).one('dblclick',function(){
				editor = showEditor(ff,0,495);
			})
		}
	})//click
	$("#form2 :input").tooltip({
		position: "center right",
		offset: [-2, 10],
		effect: "fade",
		opacity: 0.7
	});
})

</script>